home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1985 October
/
Ahoy_Magazine_85-10_1985_Double_L.d64
/
shotgun loader
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
1KB
|
52 lines
1 print"[147]":poke53280,0:poke53281,6:poke646,1
2 rem "shotgun loader"
4 rem by r. harold droid
10 ifsg=1then30
20 sg=1:load"shotgun shell",8,1
30 printchr$(13)"this program creates an auto-menu"
33 print" for a given disk"chr$(13)
34 print"sys51200 enables your new program:"
35 print" shift/restore breaks to menu"
36 print" space/restore reruns without reloading"
37 print" run-stop/restore disables"
38 print" commodore/restore does non-disabling"
39 print" warm start"chr$(13)
40 print"insert a disk containing"
50 print" basic program files"
60 print" then press a key"chr$(13)
70 poke198,0:wait198,1
80 rem ******* read directory ********
85 pn=1:pt=51769
90 open1,8,0,"$0"
100 flag=1:rem flag set for reading disk name
110 f$="":get#1,b$,b$,b$,b$
120 get#1,b$:if st<>0 then320
130 if b$<>chr$(34) then120
140 get#1,b$:if b$<>chr$(34)then f$=f$+b$:goto140
150 get#1,b$:if b$=chr$(32) then150
160 get#1,b$:ifb$<>""then160
170 if st<>0 then320
180 ifflag=0then230
190 flag=0:dn$(dn)=f$:print"disk name: "dn$(dn)chr$(13)
200 print"indicate whether a file should"
210 print" be included in the auto-menu"
215 print" by pressing y or n"
218 print" capacity is 26 files!"chr$(13)
220 goto110
230 printf$;
240 poke198,0:wait198,1:geta$:ifa$="y"then270
250 ifa$="n"thenpoke211,0:print" ";:poke211,0:goto110
260 goto240
270 print
275 iflen(f$)<>16thenf$=f$+chr$(160):goto275
280 fora=1to16:pokept,asc(mid$(f$,a,1)):pt=pt+1:next
290 pn=pn+1:ifpn>27then400
310 goto110
320 close1:poke51768,pn:pt=pt+1
322 print:input"auto menu filename shotgun[157][157][157][157][157][157][157][157][157]";pg$
330 open8,8,8,pg$+",p,w"
340 print#8,chr$(0);:print#8,chr$(192);
350 fora=51200topt:print#8,chr$(peek(a));:next
360 close8:end
400 print"menu capacity exceeded! try again...":close1:goto85